home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ADA Programming Guide
/
ADA Programming Guide.iso
/
ada_pcdp
/
ada
/
tasksl.ada
< prev
next >
Wrap
Text File
|
1996-01-30
|
579b
|
34 lines
separate(Tuple_Package)
task body Space_Lock is
begin
loop
select
accept Lock;
accept Unlock;
or
terminate;
end select;
end loop;
end Space_Lock;
separate(Tuple_Package)
task body Suspend is
Suspended: Integer := 0;
begin
loop
select
accept Release;
for I in 1..Suspended loop
accept Request;
end loop;
Suspended := 0;
or
accept Notify;
Suspended := Suspended + 1;
or
terminate;
end select;
Space_Lock.Unlock;
end loop;
end Suspend;